//
//  BaseFountion.m
//  Air
//
//  Created by dongguozheng on 2016/10/11.
//  Copyright © 2016年 董国政. All rights reserved.
//

#import "BaseFountion.h"

@implementation BaseFountion

//获取字符串中的纯数字
+(int)getData:(NSString *)str
{
    NSCharacterSet* nonDigits =[[NSCharacterSet decimalDigitCharacterSet] invertedSet];
    int remainSecond =[[str stringByTrimmingCharactersInSet:nonDigits] intValue];
    return remainSecond;
}
//判断字符串中是否是纯数字
+ (BOOL)isPureFloat:(NSString *)string{
    NSScanner* scan = [NSScanner scannerWithString:string];
    float val;
    return [scan scanFloat:&val] && [scan isAtEnd];
}
@end
